#ifndef HPLC_QINFINE_CHECKPACKET_H
#define HPLC_QINFINE_CHECKPACKET_H

#include "hplcqinfinesendcommonpacket.h"

namespace hplc
{
namespace qinfine
{

class HplcQinfineProtocolCommonData;
class HplcQinfineCheckPacket : public QObject
{
    Q_OBJECT

public:
    HplcQinfineCheckPacket(HplcQinfineProtocolCommonData &data, QObject *parent = nullptr);
    ~HplcQinfineCheckPacket();

    void replyCheck(char re);

    HplcQinfineSendCommonPacket *getSender();

    void sendRetry();
    void sendNoRetry();

    void ack2Send();
    void resetTickCheck();

public slots:
    void onRetryTimeout();
    void onTickCheckTimeout();
    void onBaseTickTimeout();

signals:
    void errorPacket();
    void lostPacket();
    void lostTick();

protected:
    HplcQinfineProtocolCommonData *m_d;
};

} // qinfine
} // hplc


#endif // HPLC_QINFINE_CHECKREPLYPACKET_H
